//
//  baseViewController.m
//  spotrs
//
//  Created by xu on 16/5/11.
//  Copyright © 2016年 TZ. All rights reserved.
//

#import "baseViewController.h"

@interface baseViewController ()
{
    UIView *topBackview;
}
@end

@implementation baseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//
//    self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 40)];
//    self.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:17];
//    self.titleLabel.textColor = [UIColor whiteColor];
//    self.titleLabel.textAlignment = NSTextAlignmentCenter;
//    self.titleLabel.backgroundColor = [UIColor clearColor];
//    self.navigationItem.titleView = self.titleLabel;
//    [self.navigationController.navigationBar setBarTintColor:RGBCOLOR(4, 63, 8)];
    
}
-(void)creatTopNavagaiong
{
    if (!_isHiddenNavagitiong) {
        topBackview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, navagationgHright)];
        [topBackview setBackgroundColor:RGBCOLOR(4, 63, 8)];
        [self.view addSubview:topBackview];
        
        UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, SCREEN_WIDTH, navagationgHright-20)];
        [title setTextAlignment:NSTextAlignmentCenter];
        [title setTextColor:[UIColor whiteColor]];
        [title setFont:[UIFont systemFontOfSize:18]];
        [title setText:self.titleText];
        [topBackview addSubview:title];
    }
    
}
-(void)creatSportTopNavagaiong
{
    if (!_isHiddenNavagitiong) {
        topBackview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, navagationgHright)];
        [topBackview setBackgroundColor:RGBCOLOR(4, 63, 8)];
        [self.view addSubview:topBackview];
        
        UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, SCREEN_WIDTH, navagationgHright-20)];
        [title setTextAlignment:NSTextAlignmentCenter];
        [title setTextColor:[UIColor whiteColor]];
        [title setFont:[UIFont systemFontOfSize:18]];
        [title setText:self.titleText];
        [topBackview addSubview:title];
    }
    
}
-(void)theTopBackAddLiftButton
{
    UIView *backView = [[UIView alloc] initWithFrame:CGRectMake(20, 20, 40, 20)];
    [topBackview addSubview:backView];
    
    UILabel *cityNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, 40, 20)];
    [cityNameLabel setText:@"北京"];
    [backView addSubview:cityNameLabel];
}
-(void)liftGoBackImage
{
    UIImageView *goBack = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 40, 20)];
    [goBack setBackgroundColor:[UIColor redColor]];
    goBack.userInteractionEnabled = YES;
    [topBackview addSubview:goBack];
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
    [tap addTarget: self action:@selector(goBack)];
    [goBack addGestureRecognizer:tap];
    
}
-(void)goBack
{
    [theApp popController];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
